Masthead

Raster File Formats

There are a large number of file formats used for raster data. Each file format has its own characteristics and problems.

Note: Georeferencing refers to "pinning" a raster to the earth. This is required because the pixels do not have coordinates storied within them as vector data does. We have to provide additional information to know where the raster is located. This is different information from a spatial reference.

Note: Like with Shapefiles, if you move raster files outside of ArcCatalog (as I often do) remember to move all the files that have the same name (before the extension). Not doing so can make the files unusable!

"GIS" Formats

There are "GIS" formats and then there are other formats. GIS file formats provide a means to specify the georeferencing and the spatial reference for spatial data. These formats include:

File formats such as "JPEG" and "TIFF" did not allow georeferencing to be included with the file originally. However, you can add a "world file" and a "prj" file and make the rasters in these file formats georeferenced and have a spatial reference.

World Files

A "World" file contains the georeferencing for a raster file. The file is a simple text file with six floating point values, one on each line. The file has the following format::

You can georeference a JPEG file by adding a text file like the one above and adding an extension of "jgw". For TIFF the extension would be "tfw". The extension is created by removing the second letter in the original extension and adding a "w" for "World" on the end.

See: https://en.wikipedia.org/wiki/World_file

ASCII Format (.asc)

The ASCII GRID format is pretty clever and allows you to see the raster data in a text editor. A good activity is to make your own ASCII grid file like the one below in a text editor such as NotePad and then save it with a ".asc" extension and load it into a GIS application. You should see an image something like the one on the right where the pixels with slashes are transparent.

  • ncols 4
  • nrows 6
  • xllcorner 0.0
  • yllcorner 0.0
  • cellsize 50.0
  • NODATA_value -9999
  • -9999 -9999 5 2
  • -9999 20 100 36
  • 3 8 35 10
  • 32 42 50 6
  • 88 75 27 9
  • 13 5 1 -9999
A GRID ascii IMage

 

For additional information, see http://en.wikipedia.org/wiki/Esri_grid

IMG

IMG or "Imaging" files are the preferred raster file format to use with ArcGIS and other Esri products. This file format is faster, supports larger rasters, and is more robust than the GRID file format that we used to recommend. Note that this is a proprietary format from ERDAS and is not a good format for data exchange.

File Extension: ".img"

TIFF

The Tagged Image File Format or "TIFF" is the preferred format for distributing data. It is well supported and one of the only issues is the support of "NoData". The problem is that there are different ways of supporting "NoData" (or a "mask"), the standard way and the way that Esri does it. This means that sometimes your masks will work and sometimes they will not. You can get your masks back (see the "issues with rasters" web page).

TIFF was not a GIS file format at birth but it is very extensible and the "GeoTIFF" format describes how to add georeferencing and spatial references into a TIFF file. Sometimes this is done and sometimes folks will add a World File and a PRJ file to a TIFF file. Fortunately, ArcGIS and BlueSpray will read either.

File Extension: .tif

JPEG

JPEG is a file format from the "Joint Photographic Experts Group". This is the most widely used format for digital cameras. One of the reasons for its popularity is that it can compress photo data without making photos look too bad. This is done with a "lossy" compression algorithm that removes certain frequencies of data that are not as visible to the human eye and small amounts of compression are fine for photos used for visualization. However, JPEG should not be used (or should have the quality setting set to the highest possible level) if you are going to use JPEG images for analysis. JPEG should also not be used for images that have any non-photo data. In other words, images with lines, boxes, arrows, text, or other "spot color" elements. This is because JPEG will ruin transitions from dark colors (including black) to light colors (including white).

JPEG is not a "GIS format" and, until recently, JPEG images could not be georeferenced. There is a new standard called "JPEG 2000" which includes georeferencing but this has not been widely adopted. Many companies are now putting coordinates into JPEG file formats using various means but it is more common for georeferenced images to be accompanied by a world file and a "prj" file.

File Extensions: jpg, jpeg

Test Your Knowledge

Next ->

© Copyright 2018 HSU - All rights reserved.